package com.xunsiya.bean;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xunsiya.tools.common.msg.Msg;

/**
 *
 *返回结果集
 * @author panjun
 * @version 1.0
 *          <p>
 *          <p>修订人		修订时间			描述信息
 *          <p>-----------------------------------------------------
 *          <p>panjun		2018/11/7		初始创建
 */
public class ResultData extends Msg {

    /** 返回码 */
    private String code = "0";

    /**
     * 标识操作是否成功
     */
    @JsonIgnore
    private boolean success;

    @Override
    public boolean isSuccess() {
        return success;
    }

    @Override
    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public ResultData() {
    }

    public ResultData(boolean success) {
        super(success);
    }

    public ResultData(boolean success, String msg) {
        super(success, msg);
    }

    public ResultData(boolean success, String msg, Object data) {
        super(success, msg, data);
    }

    public ResultData(boolean success, String msg, String code) {
        super(success, msg);
        this.code = code;
    }
}
